Learn R Programming

Sobol4R (version 0.4.0)

Autoplot implementations: Autoplot implementations

Description

Provide a ggplot visualisation when ggplot2 is available, otherwise fallback to a lightweight base R bar chart. Supports the custom sobol_result class used in this package, compact sobol_summary data frames, and sensitivity::sobol objects.

Usage

autoplot(object, ...)

# S3 method for sobol_result autoplot( object, show_uncertainty = FALSE, probs = c(0.1, 0.9), bootstrap = 200L, ... )

# S3 method for sobol autoplot(object, separate_panels = TRUE, ncol = 2, ...)

# S3 method for sobol2007 autoplot(object, ...)

# S3 method for soboljansen autoplot(object, ...)

# S3 method for sobolEff autoplot(object, ...)

# S3 method for sobolmartinez autoplot(object, ...)

# S3 method for sobol_summary autoplot(object, ...)

Value

A ggplot object when ggplot2 is installed, otherwise the bar centres invisibly.

Arguments

object

A sobol_result, sobol_summary, or sensitivity::sobol instance.

...

Further arguments passed to the plotting backend.

show_uncertainty

Logical, when TRUE bootstrap quantiles are computed (if available) and displayed as error bars.

probs

Numeric vector of probabilities used for the uncertainty bars.

bootstrap

Integer indicating how many bootstrap resamples to draw when show_uncertainty = TRUE.

separate_panels

Should the indices be plotted on separate panels according to their order? If separate_panels = TRUE, the first order indices are separated from the higher orders ones.

ncol

If separate_panels = TRUE, the number of columns for the facet wrapping of the plot.